/*Copyright ©2015 TommyLemon(https://github.com/TommyLemon)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.*/

package com.nhc.model;

import java.util.ArrayList;

import zuo.biao.library.base.BaseModel;

//最外层的Folder
public class KMLFolder extends BaseModel {

    private static final long serialVersionUID = 1L;

    public ArrayList<KMLPlacemark> placemarkList = new ArrayList<KMLPlacemark>();

    public int Folder = 0;//Folder 层级 0,1,2  0->1->2->1->0

    public String folder0Name = "";
    public String folder1Name = "";
    public String folder2Name = "";

    public int type = 0;//0-航点 1-航线 2-航迹

    public KMLFolder() {

    }

    @Override
    protected boolean isCorrect() {
        return id > 0;
    }

    public void addName(String name) {
        if (name == null) {
            return;
        }
        if (Folder == 0) {
            folder0Name = name;
        } else if (Folder == 1) {
            folder1Name = name;
        } else if (Folder == 2) {
            folder2Name = name;
        }
    }
}
